<?php
/**
 * Created by PhpStorm
 * User: rain
 * Date: 2018/12/26
 * Time: 下午5:23
 */

namespace App\Models;

use App\User;
use Illuminate\Database\Eloquent\Model;


/**
 * Class Roasts
 * @property integer $id
 * @property integer $user_id
 * @property string $roast_txt
 * @property string $praise_txt
 * @property integer $status
 * @property string $mark
 * @property string $created_at
 * @property string $updated_at
 * @package App\Models
 */
class Roasts extends Model
{
    protected $table = 'roasts';

    protected $guarded = ['id'];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function images()
    {
        return $this->hasMany(RoastImages::class,'roast_id','id');
    }
}
